<?php 
if(!$this->Session->check('Auth.User.id')) {
	
    $_login=$this->Html->link(__('Login',true),array('controller'=>'users','action'=>'login'));
    $_register=$this->Html->link(__('register',true),array('controller'=>'users','action'=>'register'));    		
    $message=sprintf(__('You must %s or %s to comment!',true),$_login,$_register).'<br />'. __('Or, sign-in super fast with your Facebook account ...',true);

    echo $this->element('warn',array('message'=>$message));
	
} elseif(isset($error)&& $error){ 
	echo $this->element('warn',array('message'=>$error));
} else { 
	
	echo $this->Form->create('Comment');
	echo $this->Form->input('content');
	echo $this->Ajax->submit(__('Submit comment',true), array('url'=> array('controller'=>'links', 'action'=>'addcomment',$link_id), 'update' => 'commentForm'));
	echo $this->Form->end();
} ?>
